/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package my12306;

import java.applet.Applet;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Jack
 */
public class AudioTest {

    public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                System.out.println("url: " + getClass().getResource("resources/Audio.wav"));
                Applet.newAudioClip(getClass().getResource("resources/Audio.wav")).play();
                try {
                    synchronized (this) {
                        this.wait();
                    }
                } catch (InterruptedException ex) {
                    Logger.getLogger(AudioTest.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }.start();
    }
}
